<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE');

header("Content-type: text/html; charset=utf-8");
define("DS", '/');
define("APP_PATH",  dirname(__FILE__).DS.'application'.DS);


// $ms_host = "47.93.35.3"; //主机
// $ms_user = "sa"; //用户名
// $ms_pass = "HWSp29qCGEAHBmfnah"; //密码
// $ms_data = "shop";  //MSSQL库名
// $ms_connect = mssql_connect($ms_host, $ms_user, $ms_pass)
// or die("Couldn't connect to SQL Server on $$ms_host");

// $serverName = "47.93.35.3, 1433"; //serverName\instanceName, portNumber (default is 1433)
// $connectionInfo = array( "Database"=>"shop", "UID"=>"sa", "PWD"=>"HWSp29qCGEAHBmfnah","CharacterSet"=>"UTF-8");
// $conn = sqlsrv_connect( $serverName, $connectionInfo);
// print_r( sqlsrv_errors());
// if( $conn ) {
// 	echo "Connection established.<br />";
// }else{
// 	echo "Connection could not be established.<br />";
// 	die( print_r( sqlsrv_errors(), true));
// }

// exit();
// echo('aaaaa');
// try {

// 	$conn =new PDO("sqlsrv:Server=47.93.35.3,1433;Database=shop","sa","HWSp29qCGEAHBmfnah");
	        

// 	$conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );

// }



// catch( PDOException $e ) {

// 	die( "Error connecting to SQL Server".$e->getMessage() );

// }





 //exit('bbbb');
if (!session_id()) session_start();
$app  = new Yaf_Application(APP_PATH . "conf/application.ini");
$app->bootstrap()->run();